user {{ nginx_run_user }};
worker_processes  2;

error_log  logs/error.log;
pid        logs/nginx.pid;

events {
    worker_connections  10240;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log logs/access.log  main;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    types_hash_max_size 2048;
    proxy_connect_timeout 300;
    proxy_send_timeout 300;
    proxy_read_timeout 300;
    keepalive_timeout  65;
    
    client_header_buffer_size 256k;
    large_client_header_buffers 4 256k;
    client_max_body_size 1024m;
    client_body_buffer_size 1024m;
    underscores_in_headers on;

    gzip  on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    gzip_http_version 1.1;
    gzip_comp_level 2;
    gzip_types text/plain application/javascript text/css application/xml;
    gzip_vary on; 

    server {
        listen  80;
        #listen  443 ssl;
        server_name _;
        root {{ nginx_base_path }}/html/;
        index  index.html index.htm;
        
        gzip_comp_level 9;

        #if ( $server_port = 80 ) {
        #        return 301 https://$host$request_uri;
        #}

        #include {{ nginx_base_path }}/ssl.conf;
        #ssl_certificate     cert/xx.pem;
        #ssl_certificate_key cert/xx.key;
        #include {{ nginx_base_path }}/rules.conf;
        access_log  logs/luda.zhonglr.com.access.log;
    }
    include vhost/*.conf;
}
